<?php

namespace App\Models;

//use Illuminate\Database\Eloquent\Model;
use Jenssegers\Mongodb\Eloquent\Model;
//use Jenssegers\Mongodb\Connection;

class Product extends Model
{

    protected $connection = 'mongodb';  //库名

    protected $collection = 'products';// 表名


    protected $fillable = [
//        'id',
        'name',
        'color',
        'show'
    ];



    public function user()
    {
        return $this->belongsTo(AdminUser::class, 'user_id');
    }

}
